//交叉类型:多种类型同时满足

type NewType = number & string; //，没有意义

interface Ikun {
  name: string;
  age: number;
}
interface ICoder {
  name: string;
  coding: () => void;
}

//上面两个接口同时满足，通常用于两个对象进行交叉
const info: Ikun & ICoder = {
  name: "why",
  age: 18,
  coding: function () {
    console.log("coding");
  },
};
